package com.shine.service;

import com.shine.request.CaptchaVerifyRequest;
import com.shine.request.LoginRequest;
import com.shine.request.UserRegisterRequest;
import com.shine.response.CaptchaResponse;
import com.shine.response.UserLoginResponse;
import com.shine.info.UserInfo;
import com.shine.security.UserPrincipal;

/**
 * @author huihui
 * @date 2024/12/4 14:49
 * @description LoginService
 */
public interface LoginService {

    /**
     * 获取验证码
     *
     * @return
     */
    CaptchaResponse getCaptcha();

    /**
     * 验证验证码
     *
     * @param request
     */
    void verifyCaptcha(CaptchaVerifyRequest request);

    /**
     * 登录
     *
     * @param request
     * @return
     */
    UserLoginResponse login(LoginRequest request);

    /**
     * 获取用户信息
     *
     * @return
     */
    UserPrincipal getUserInfo();

    /**
     * 用户注册
     *
     * @param request
     * @return
     */
    Boolean register(UserRegisterRequest request);

}
